<template>
	<div class="publicformview">
		<div class="bottomTop" style="margin-top: 10px;">
			<el-table max-height='500px' v-loading="listLoading" :data="list" border fit highlight-current-row size="mini">
				<el-table-column align="center" label="序号" prop="orderno">
				</el-table-column>
			
				<el-table-column align="center" label="所号" prop="blockno">
				</el-table-column>
				
				<el-table-column align="center" label="地点" prop="address">
				</el-table-column>
				
				<el-table-column align="center" label="地号" prop="FieldIDNo">
				</el-table-column>
				
				<el-table-column align="center" label="房产证号" prop="EstateIDNo">
				</el-table-column>
				
				<el-table-column align="center" label="存放处" prop="SavingPlace">
				</el-table-column>
				
				<el-table-column align="center" label="借阅日期" prop="BorrowDate">
				</el-table-column>
				
				<el-table-column align="center" label="借阅人" prop="Borrower">
				</el-table-column>
			</el-table>
		</div>
		<div class="publicpaginationview">
			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
				:current-page="listQuery.pageNum" background :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
				layout="total, sizes, prev, pager, next, jumper" :total="total" small></el-pagination>
		</div>
		
		<!-- <div class="saveContent">
			<el-button type="primary" @click="chaifenVisible = false" size="medium">保 存</el-button>
		</div> -->
	</div>
</template>

<script>
	import {
		blockDetailCertificate
	} from '@/api/industry'
	export default {
			props:{
				blockType:String,
				blockid:String,
				blockno:String
			},
		name: "fangwuxianzhuang",
		data() {
			return {
				listQuery: {
					pageNum: 1,
					pageSize: 20,
					keyword: "",
					mobile: "",
					status: "1",
					time: ""
				},
				total: 0,
				options: [{
					key: "1"
				}],
				list: [],
				listLoading: false,
				dialogVisible: false,
				isChanquan: true,
				type: 1
			};
		},

		computed: {
			deptName() {
				return (val) => {
					if (val == "1") {
						return "事业部";
					}
					return "生活部";
				};
			},
		},

		mounted() {
			this.blockDetailCertificate()
		},

		methods: {
			resetForm(val) {
				console.log("1");
				this.$refs[val].resetFields();
			},
			blockDetailCertificate(){
				
				if(this.blockno){
					let data = {
						BlockNo:this.blockno
					}
					blockDetailCertificate(data).then(res=>{
						this.list = res.data
						this.total = res.data.total
					})
				}
				
			},
			handleSizeChange(val) {
				this.listQuery.pageNum = 1;
				this.listQuery.pageSize = val;
				this.blockDetailCertificate();
			},
			handleCurrentChange(val) {
				this.listQuery.pageNum = val;
				this.blockDetailCertificate();
			},
			returns() {
				this.$router.go(-1)
			},
			// 选择类型
			selectButton(type) {
				this.type = type
			}
		},
	};
</script>

<style scoped>
	.headTop {
		width: 100%;
		display: flex;
		justify-content: space-between;

		.xinxi {
			display: flex;
			width: 800px;
		}
	}

	.el-form-item {
		justify-content: start !important;
	}

	.el-select {
		width: 180px;
	}

	.el-input {
		width: 180px;
	}

	.el-date-picker {
		width: 180px;
	}

	.bottomTop {
		width: 100%;
		display: flex;
		justify-content: end;
	}

	.tabButton {
		background: #EFF2F7;
		color: #333333;
		border: none;
	}

	.fangwuList {
		width:100%;
		background-color: #F5F5F5;
		margin: 3px auto 0;
		overflow: hidden;
	}

	.fangwuText {
		font-weight: bold;
		font-size: 16px;
		color: #008C93;
		margin-top: 20px;
		margin-left: 26px;
	}
	.saveContent {
		width: 100%;
		display: flex;
		justify-content: end;
		margin-top: 20px;
		padding-bottom: 20px;
	}
</style>